﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<Model.EspecialidadeModel>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Index
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<h2>Index</h2>

<p>
    <%: Html.ActionLink("Cadastrar nova Especialidade", "Create") %>
</p>
<table>
    <tr>
        <th>
            Codigo
        </th>
        <th>
            Nome
        </th>
        <th></th>
    </tr>

<% foreach (var item in Model) { %>
    <tr>
        <td>
            <%: Html.DisplayFor(modelItem => item.IDecodigo) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.enome) %>
        </td>
        <td>
            <%: Html.ActionLink("Editar", "Edit", new {  id=item.IDecodigo }) %> |
            <%: Html.ActionLink("Detalhes", "Details", new {  id=item.IDecodigo }) %> |
            <%: Html.ActionLink("Exclusão", "Delete", new { id = item.IDecodigo })%>
        </td>
    </tr>
<% } %>

</table>


<div>
    <%: Html.ActionLink("Voltar", "Index","Administrador") %>
</div>

</asp:Content>

